from langchain.prompts import ChatPromptTemplate
from tool import langchain_client
from langchain.chains import ConversationChain
from langchain.memory import ConversationBufferMemory
if __name__ == '__main__':
    memory = ConversationBufferMemory()
    memory.save_context({"input": "你好，我叫皮皮鲁"}, {"output": "你好啊，我叫鲁西西"})
    memory_info = memory.load_memory_variables({})
    print(memory_info)

    memory.save_context({"input": "很高兴和你成为朋友!"}, {"output": "是的，让我们一起去冒 险吧!"})
    memory_info1 = memory.load_memory_variables({})
    print(memory_info1)